#

pkgname=thunar
pkgver=1.3.0
pkgrel=1
pkgdesc="Thunar is a modern file manager for Xfce"
arch=('ppc')
license=('GPL2' 'LGPL2.1')
url="http://thunar.xfce.org"
groups=('xfce4')
depends=('libx11' 'exo>=0.6.0' 'glib2' 'gtk2' 'libxfce4util' 'libxfce4ui' \
				'libsm' 'dbus-glib' 'startup-notification' 'udev' 'libnotify' \
				'desktop-file-utils' 'libexif' 'hicolor-icon-theme' 'libpng' \
				'xfce4-panel' 'gvfs')
makedepends=('intltool' 'perl' 'pkg-config' 'gettext')
optdepends=('tumbler: for thumbnail previews'
						'thunar-volman: manages removable devices'
            'thunar-archive-plugin: create and deflate archives'
            'thunar-media-tags-plugin: view/edit id3/ogg tags')
options=('!libtool')
install=${pkgname}.install
backup=('etc/polkit-1/localauthority/50-local.d/org.freedesktop.udisks.pkla')
source=(http://archive.xfce.org/src/xfce/${pkgname}/1.3/Thunar-${pkgver}.tar.bz2
	org.freedesktop.udisks.pkla)
md5sums=('ab6f728384c0d925b40afae2f41268f3'
         'a7ddb5eec02d9a8e91a2997862e73cd8')

build() {
  cd ${srcdir}/Thunar-${pkgver}
  ./configure --prefix=/usr \
	--sysconfdir=/etc \
	--libexecdir=/usr/lib/xfce4 \
	--localstatedir=/var \
	--disable-static \
	--enable-nls \
	--enable-gio-unix \
	--enable-dbus \
	--enable-startup-notification \
	--enable-gudev \
	--enable-notifications \
	--disable-gtk-doc \
	--without-html-dir \
	--disable-debug \
	--enable-apr-plugin \
	--enable-exif \
	--enable-sbr-plugin \
	--enable-pcre \
	--enable-tpa-plugin \
	--enable-uca-plugin \
	--enable-wallpaper-plugin
  make
}

package() {
  cd ${srcdir}/Thunar-${pkgver}
  make DESTDIR=${pkgdir} install

  # install udisks permission file
  install -dm700 "${pkgdir}"/etc/polkit-1/localauthority
  install -dm755 "${pkgdir}"/etc/polkit-1/localauthority/50-local.d
  install -m644 "${srcdir}"/org.freedesktop.udisks.pkla \
					"${pkgdir}"/etc/polkit-1/localauthority/50-local.d/
}
